package com.duotai.duotai1;

public class Test {
    public static void main(String[] args) {
        //父类的引用指向子类对象
        Animal animal = new Dog();
        animal.eat();
        animal.sleep();


        Animal a1 = new Dog();
        a1.learn();


    }
}
